<!DOCTYPE html>
<html>
<head>
	<title>育婴师简历</title>
	<meta charset="utf-8">
	<link rel="stylesheet" type="text/css" href="/layui-v2.3.0/layui/css/layui.css"  media="all">
	<link rel="stylesheet" type="text/css" href="/css/front/individualInfo.css">
	<link id="judge" rel="stylesheet" href="http://www.51baomu.cn/css_new/style_1000.css" />
	<link rel="stylesheet" href="http://www.51baomu.cn/css_new/style_new.css" />
	<link href="http://www.51baomu.cn/Styles/base20100719.css" rel="stylesheet" type="text/css" />
	<link href="http://www.51baomu.cn/Styles/pshow20111107.css" rel="stylesheet" type="text/css" />
	<link href="http://www.51baomu.cn/Styles/regist.entry.css" rel="stylesheet" type="text/css" />
	<!--<link href="http://www.51baomu.cn/Styles/Styles/thickbox.css" rel="stylesheet" type="text/css" />-->
	<link rel="stylesheet" type="text/css" href="/css/front/button.css">

	<script src="/jquery/jquery.min.js"></script>

	<script type="text/javascript" src="/layui-v2.3.0/layui/layui.js"></script>
	<script>
		layui.use('element', function(){
 		var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块
  
  		//监听导航点击
  		element.on('nav(demo)', function(elem){
    	//console.log(elem)
    		layer.msg(elem.text());
		});
		});
	</script>

<script>
layui.use(['form', 'layedit', 'laydate'], function(){
  var layer = layui.layer
  ,layedit = layui.layedit
  ,laydate = layui.laydate
	  ,form =layui.form;
  
  //日期
  laydate.render({
    elem: '#date'
  });
  laydate.render({
    elem: '#date1'
	  ,range: "/"
	  ,done: function(value, date, endDate){
        var strStartDate=value.split("/")[0].replace(/^\s+|\s+$/g,"");
        var strEndDate=value.split("/")[1].replace(/^\s+|\s+$/g,"");
          $.post("/front/getWorkDay", {"strStartDate":strStartDate,"strEndDate":strEndDate}, function(data){
			  console.log(data.days);
			  $("#money").html(parseInt("${worker.startSalary}")+parseInt("${worker.perSalary}")*data.days+"元");
			  $("input[name='money']").val("${worker.perSalary}"*data.days);
			  $("input[name='startDate']").val(strStartDate);
              $("input[name='endDate']").val(strEndDate);
          });
	  }
  });
    form.on('submit(*)', function(data){
        $.post($("#contractForm").attr("action"), $("#contractForm").serialize(), function(data){
            if(data.status == 200){
                layer.alert(data.msg, {
                    icon: 1,
                    skin: 'layer-ext-moon'
                },function () {
					window.location.href="/myContract.html";
                });
            }else{
                layer.alert(data.msg, {
                    icon: 2,
                    skin: 'layer-ext-moon'
                });
            }
        });
        return false; //阻止表单跳转。
    });
});
</script>

<script type="text/javascript">
	function closeIt() {
		var div = document.getElementById('addContact');
		var cover1 = document.getElementById("cover1");
		div.style.display='none';
		cover1.style.display="none";
	}
</script>
<script type="text/javascript">
	function openIt() {
		var div = document.getElementById('addContact');
		var cover1 = document.getElementById("cover1");
		div.style.display='block';
		cover1.style.display="block";
	}
</script>

</head>
<body style="background-color: #DDDDDD">
	<% include("/templates/common/nav.html"){} %>


<div class="overall" id="overall">
		<div class="icon"><img src="${worker.image!}" class="photo"></div>
		<div class="info">
			<div class="row">
				<label class="normal">保姆编号:</label>
				<label class="label-id" id="workID">${worker.id}</label>
			</div>
			<div class="row">
				<label class="normal">保姆名称:</label>
				<label class="label-id" >${worker.username!}</label>
			</div>

			<div class="row" style="margin-top: -3px">
				<label class="normal">客户评价:</label>
				<div id="comment" class="comment"></div>
			</div>
			<div class="row">
				<label class="normal">所在地区:</label>
				<label class="label-area" id="area">${worker.address}</label>
			</div>
			<div class="row">
				<label class="normal">期望工资:</label>
				<label class="label-salary" id="salary">${worker.startSalary!}起 合同期间${worker.perSalary!}/天</label>
			</div>
			<div class="row">
				<label class="normal">自我介绍:</label>
				<label class="normal">${worker.introduction}</label>
			</div>

			<div class="biaoqian" id="biaoqianBox">
				<span><img src="http://www.51baomu.cn/img_new/biaoqianBg.jpg" alt="">经验丰富(1)</span>
				<span><img src="http://www.51baomu.cn/img_new/biaoqianBg.jpg" alt="">有爱心(1)</span>
				<span><img src="http://www.51baomu.cn/img_new/biaoqianBg.jpg" alt="">反馈满意度高(1)</span>
			</div>

			<div id="choose" class="m mt20">
                <div class="btns clearFix">
                    <div class="btnsRight fr" onclick="openIt();">
                                <img alt="我要预约" src="http://www.51baomu.cn/img_new/yuyue.jpg" title="我要预约这位保姆">
                    </div>
                    <div id="bdshare">
                        <span><strong>马上联系实名认证好育婴师</strong></span>&nbsp;&nbsp;&nbsp;&nbsp;<span><strong>联系电话：</strong><span id="randomNum" style="font-size: 28px; color: red;">18149527102</span></span>
                    </div>
                    <input id="coll548747" class="btn-coll" onclick="" value="加关注" type="button" style="display: none">
                </div>
            </div>

		</div>
	</div>

	<div class="cover1" id="cover1" style="display: none;"></div>

	<div class="addContact" style="display: none;" id="addContact">

		<div class="close" onclick="closeIt()"> 
				<img src="/images/close.png" class="close-image">
		</div>
		<form id="contractForm" method="post" action="/front/order" class="layui-form">
			<input type="hidden" name="nurseryTeacherId" value="${worker.id}"/>
			<input type="hidden" name="orgId" value="${worker.orgId}"/>
			<input type="hidden" name="userId" value="${session.cUser.id}"/>
			<input type="hidden" name="startDate" value=""/>
			<input type="hidden" name="endDate" value=""/>
			<input type="hidden" name="money" value=""/>
			<input type="hidden" name="address" value="${session.cUser.address}"/>
			<div class="column" style="margin-top: 20px;">
	    		<label class="label">服务对象：</label>
      			<label class="order-right">${session.cUser.username}</label>
	    	</div>


	    	<div class="column">
	    		<label class="label">育婴师ID：</label>
      			<label class="order-right">${worker.id!}</label>
	    	</div>

	    	<div class="column">
	    		<label class="label">起止时间：</label>
	    		<input type="text"  id="date1" lay-verify="required" placeholder="yyyy-MM-dd" autocomplete="off" class="input">
	    	</div>

	    	<div class="column">
	    		<label class="label">总金额：</label>
      			<label class="order-right" id ="money" style="color: red">请先选择服务起止时间</label>
	    	</div>

	    	<div class="column">
	    		<label class="label" style="position: absolute;">备注：</label>
	    		<textarea id="extraInfo" class="extraInfo"></textarea>
	    	</div>

			<div class="column">
	    		<button id="submit" class="button button-3d button-action button-pill" style="position: absolute; font-size: 20px; margin-left: 150px; margin-top: 500px; width: 250px;" lay-submit lay-filter="*">确定预约</button>
	    	</div>
		</form>
	</div>

	<div class="detail" id="detail">

		<div class="cont-base-info baseHeight1"  style="width: 750px; margin-left: 25px;">
			<h3 class="newP">基本信息</h3>
			<div class="clearFix base-info-item">
				<div class="fl" style="height: 48px;">手机号码</div>
				<div class="fl" style="width: 550px; padding-left: 15px;">
					<span id="lblLxfs">${worker.telephone!}</span>
				</div>
			</div>
			<div class="clearFix base-info-item">
				<div class="fl" style="height: 48px;">类&nbsp;&nbsp;　&nbsp;&nbsp;型</div>
				<div class="fl" style="width: 550px; padding-left: 15px;">
					<span id="lblLx">${worker.workerLevel.desc!}</span>
				</div>
			</div>
			<div class="clearFix base-info-item">
				<div class="fl" style="height: 48px;">籍&nbsp;&nbsp;　&nbsp;&nbsp;贯</div>
				<div class="fl" style="width: 550px; padding-left: 15px;">
					<span id="lblJg">${worker.nativePlace!}</span>
				</div>
			</div>
			<div class="clearFix base-info-item">
				<div class="fl" style="height: 48px;">婚&nbsp;&nbsp;　&nbsp;&nbsp;姻</div>
				<div class="fl" style="width: 550px; padding-left: 15px;">
					<span id="lblHy">${worker.married == true ?"已婚" : "未婚"}</span>
				</div>
			</div>
			<div class="clearFix base-info-item">
				<div class="fl" style="height: 48px;">当前城市</div>
				<div class="fl" style="width: 550px; padding-left: 15px;">
					<span id="lblDqjzcs">武汉</span>
				</div>
			</div>
			<div class="clearFix base-info-item">
				<div class="fl" style="height: 48px;">年&nbsp;&nbsp;　&nbsp;&nbsp;龄</div>
				<div class="fl" style="width: 550px; padding-left: 15px;">
					<span id="lblNl">${worker.age!}</span>
				</div>
			</div>
			<div class="clearFix base-info-item">
				<div class="fl" style="height: 48px;">星&nbsp;&nbsp;　&nbsp;&nbsp;座</div>
				<div class="fl" style="width: 550px; padding-left: 15px;">
					<span id="lblXz">${worker.constellation!}</span>
				</div>
			</div>
			<div class="clearFix base-info-item">
				<div class="fl" style="height: 48px;">最高学历</div>
				<div class="fl" style="width: 550px; padding-left: 15px;">
					<span id="lblZgxl">${worker.education.desc!}</span>
				</div>
			</div>
			<div class="clearFix base-info-item">
				<div class="fl" style="height: 48px;">期望城市</div>
				<div class="fl" style="width: 550px; padding-left: 15px;">
					<span id="expectedCity">${worker.expectedCity!}</span>
				</div>
			</div>
			<div class="clearFix base-info-item">
				<div class="fl" style="height: 48px;">目前状态</div>
				<div class="fl" style="width: 550px; padding-left: 15px;">${worker.free! == true ? "空闲" : "已签约"}</div>
			</div>
		</div>

		

	</div>


	<div class="recommendation" id="recommendation">
		<div class="gold-tuijian cont-gold-tuijian mb15" style="width: 267px; height: 665px;">
			<i class="fl"></i>
			<strong class="fl">相似阿姨推荐</strong>
			<div class="gold-tuijian-box rank">
				<div class="mc" id="divTuijian">
					<!--<ul class="tab">-->
						<!--<li class="curr">相似阿姨</li>-->
						<!--<li>同经验</li>-->
						<!--<li>同工资</li>-->
					<!--</ul>-->
					<ul class="tabcon">
						<%
							for(recommend in recommends!){
						%>
							<a href="/individualInfo.html?workerId=${recommend.id}">
								<li class="fore" style="HEIGHT: 100px;"><span>
								<div class="p-img">

									<img title="${recommend.introduction!}" alt="${recommend.introduction!}" src="${recommend.image!}" width="70" height="93">
								</div>
								<div class="p-name" style="HEIGHT: 100px;">
									<h3>${recommend.workerLevel.desc!}</h3>
									<p class="zhuzhi">${recommend.address!}</p>
									<p>年龄:${recommend.age!}岁</p>
									<p>工作经验:${recommend.experience!}月</p>
									<p><span>期望工资:${recommend.perSalary!}/天</span></p>
								</div></span></li>
							</a>
						<%
							}
						%>

					</ul>

				</div>
			</div>
		</div>
	</div>


	<div class="evaluate">
		<div class="label-user">
			<label>客户评价</label>
		</div>
		<hr style="margin-left: 20px; margin-right: 20px; height:5px;border:none;border-top:10px groove skyblue;" />
		<div class="evaluate-table">
			<%
				for(comment in comments!){
			%>
				<div class="evaluate-record">
					<div class="record-text"><p  style="font-size: 18px;">${comment.content!}</p></div>
					<div class="record-user"><label style="font-size: 15px;">${comment.username!}</label></div>
					<div class="record-date"><p  style="font-size: 10px; color: #C0C0C0">评论时间:${comment.createDate,dateFormat="yyyy-MM-dd"}</p></div>
					<hr style="height:1px;border:none;border-top:1px #555555;" />
				</div>
			<%
				}elsefor{
			%>
				<div class="evaluate-record">
					<span>暂无评价</span>
				</div>
			<%
				}
			%>
		</div>
	</div>

	<div style="width: 100%; margin-top: 1880px; position: absolute; height: 70px; background-color: #3399FF; color: white; font-size: 12px; text-align: center;">
        <p style="font-size: 14x; margin-top: 20px;">Copyright ©2018-2019【母婴系统】 华迪有限公司 | 川ICP备号-3 | 川公网安备 11011502019527</p>
    </div>

</body>
<script>
    layui.use(['rate'], function() {
        var rate = layui.rate;
        rate.render({
            elem: '#comment'
            ,value: "${worker.star!}"
            ,readonly: true
        });
    })
</script>
</html>